package com.alibaba.goods.user.account.controller;

import com.alibaba.goods.user.account.entity.Commentresult;
import com.alibaba.goods.user.account.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

/**
 * @Author:RenPu
 * @Date: 2020/7/7 16:02
 * @Version: 1.0
 * @description:
 */

@RestController
@Slf4j
public class AccounController {

    @Resource
    private AccountService accountService;

    @RequestMapping(value = "/account/decrease")
    public Commentresult decrease( Long userId,  BigDecimal money){
        accountService.decrease( userId,money );

        return new Commentresult( 200,"扣减金额成功" );
    }


}
